﻿using FR.SAFTAnalyser.ViewModels.Tools;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;

namespace FR.SAFTAnalyser.ViewModels.Pane
{
    public class PanesStyleSelector : StyleSelector
    {
        public PanesStyleSelector()
        {

        }

        public Style CustomersStyle { get; set; }
        public Style GeneralLedgerStyle { get; set; }
        public Style GeneralLedgerEntriesStyle { get; set; }
        public Style HeaderStyle { get; set; }
        public Style InvoicesSummaryStyle { get; set; }
        public Style InvoicesStyle { get; set; }
        public Style InvoiceStyle { get; set; }
        public Style WorkingDocumentsStyle { get; set; }
        public Style MovementOfGoodsStyle { get; set; }
        public Style ProductsStyle { get; set; }
        public Style SaftStyle { get; set; }
        public Style SuppierStyle { get; set; }
        public Style TaxStyle { get; set; }
        public Style PaymentsStyle { get; set; }

        //stocks
        public Style StockHeaderStyle { get; set; }
        public Style StockProductsStyle { get; set; }

        //tools
        public Style ErrorMessagesStyle { get; set; }
        public Style SaftPartsStyle { get; set; }
        public Style ConvertPemKeyStyle { get; set; }
        public Style SaveBDStyle { get; set; }
        public Style CreateHashFromUserInputStyle { get; set; }

        public override System.Windows.Style SelectStyle(object item, System.Windows.DependencyObject container)
        {
            if (item is CustomersViewModel)
                return CustomersStyle;
            if (item is GeneralLedgerViewModel)
                return GeneralLedgerStyle;
            if (item is GeneralLedgerEntriesViewModel)
                return GeneralLedgerEntriesStyle;
            if (item is HeaderViewModel)
                return HeaderStyle;
            if (item is InvoicesSummaryViewModel)
                return InvoicesSummaryStyle;
            if (item is InvoicesViewModel)
                return InvoicesStyle;
            if (item is InvoiceViewModel)
                return InvoiceStyle;
            if (item is WorkingDocumentsViewModel)
                return WorkingDocumentsStyle;
            if (item is MovementOfGoodsViewModel)
                return MovementOfGoodsStyle;
            if (item is ProdutsViewModel)
                return ProductsStyle;
            if (item is SupplierViewModel)
                return SuppierStyle;
            if (item is SaftViewModel)
                return SaftStyle;
            if (item is TaxViewModel)
                return TaxStyle;
            if (item is PaymentsViewModel)
                return PaymentsStyle;

            //stocks
            if (item is StockHeaderViewModel)
                return StockHeaderStyle;
            if (item is StocksProductsViewModel)
                return StockProductsStyle;

            //tools
            if (item is ConvertPemKeyViewModel)
                return ConvertPemKeyStyle;
            if (item is ErrorMessagesViewModel)
                return ErrorMessagesStyle;
            if (item is DocumentPartsViewModel)
                return SaftPartsStyle;
            if (item is SaveToBDViewModel)
                return SaveBDStyle;
            if (item is CreateHashFromUserInputViewModel)
                return CreateHashFromUserInputStyle;

            return base.SelectStyle(item, container);
        }
    }
}
